Sudo Slider jQuery Plugin - Slide on event demo

  • Here i got some kind of form.

    If you enter something in the below form, you can get to the next slide by clicking the button.

  • Because you could enter somethings into the form, i got you a picture of a goat.

    Go back

Usage

Include the javascripts

<script type="Text/Javascript" src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../js/jquery.sudoSlider.min.js"></script>

The Javascript to start it.

<script type="text/javascript" >
   $(document).ready(function(){
      var sudoSlider = $("#slider").sudoSlider({
         prevNext: false,
         customLink:'a.eventclass'
      });
      $('button.clickbuttonclass').click(function() {
         // Here i do some check, to see if the content is valid.
         var value = $('input#someID').val();
         if (value) {
            sudoSlider.goToSlide(2);
         } else {
            alert('ERROR!!!');
         }
      });
   });
</script>

The HTML

<div id="slider" >
    <ul>
        <li><img src="../images/01.jpg" alt="image description"/></li>
        <li><img src="../images/02.jpg" alt="image description"/></li>
        <li><img src="../images/03.jpg" alt="image description"/></li>
        <li><img src="../images/04.jpg" alt="image description"/></li>
        <li><img src="../images/05.jpg" alt="image description"/></li>
    </ul>
</div>